home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ASME's Mechanical Engine…ing Toolkit 1997 December
/
ASME's Mechanical Engineering Toolkit 1997 December.iso
/
basic
/
bas2qb13.lzh
/
BAS2QB.DOC
next >
Wrap
Text File
|
1987-07-02
|
3KB
|
71 lines
BAS2QB Version 1.3 (6/87)
A QuickBASIC Programmer's Utility
Copyright 1987 By Joe Frankiewicz
This program is SHAREWARE. That means if you use it, you should
send in a donation. You'll feel better if you do. (Really).
That also means that you musn't charge a fee for this program.
(And please don't make any alterations to the program or Doc's.)
BAS2QB converts a normal BASIC program (saved as an ASCII file)
to a QuickBASIC-type file with unnecessary line numbers removed
and all other line numbers converted to labels. All references
to those line numbers are also changed to labels. The label
consists of the letter 'L' followed by the line number itself.
BAS2QB also makes sure that 'THEN' or 'ELSE' statements followed
by line numbers are changed to 'THEN GOTO' or 'ELSE GOTO'as
required by QuickBASIC.
To start the program, type 'BAS2QB' and press [RETURN].
When prompted for the INPUT Filename, enter the source file's
drive\path\filename[.ext]. If you do not supply an extension,
.BAS is used by default. The source file must be a standard
BASIC program that has been saved in ASCII
format (SAVE'programname',A).
When prompted for the OUTPUT Filename, enter the destination
file's drive\path\filename[.ext] or just press [RETURN] to
use the default filename (shown in brackets). If you do not
supply an extension, .QBS is used by default.
The program may also be started in the following manner:
BAS2QB source drive\path\filename[.ext] [target drive\path\filename[.ext]]
The same defaults will be in effect when starting the
program in this manner.
The conversion is a two-pass operation. The source file
will be read in the first pass in order to build a
table of line numbers that are referenced by branching
statements. The following statements are cross-referenced:
GOSUB RETURN GOTO THEN ELSE RESTORE RESUME RUN
If the program was started without filenames on the command
line, the current physical line number and total number of
branching references will be displayed as the file is read.
In the second pass, the file is read again. However, in this
pass, the file is copied to the output file, eliminating any
line numbers that are not referenced, and changing those that
are referenced into labels. Each line is then searched for
line numbers and if any are found, they are changed to labels
also. If a 'THEN linenumber' or 'ELSE linenumber'statement
is found, it is converted to 'THEN GOTO linenumber' or 'ELSE
GOTO linenumber' as required by the QuickBASIC compiler.
The program will then display the elapsed time and exit
to DOS.
Send donations, bug reports, and suggestions to:
Joe Frankiewicz
1527 Norway #2B
Palatine, IL 60074
Thanks!
This program was created with Microsoft QuickBASIC V2.01